<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: 2022/5/9
 * Time: 12:00
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

namespace app\common\business;

use app\common\model\MallShop;

class BusShop extends Base
{
    protected $model = null;

    public function __construct()
    {
        $this->model = new MallShop();
    }

    /**
     * @param array $where
     * @param string $field
     * @return array
     */
    public function getBaseByList(array $where = [], string $field = '*')
    {
        try {
            $result = $this->model->getBaseByList($where, $field);
        } catch (\Exception $e) {
            throw new Exception($e->getMessage());
        }
        $lists = [];
        if(!empty($result)){
            foreach ($result as $v){
                $lists[$v['id']] = $v;
            }
        }
        return $lists;
    }
}